package com.ycl.orderservice.client;

import com.ycl.orderservice.entity.PageVO;
import com.ycl.orderservice.entity.Product;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class ProductServiceFeignClientFallback implements ProductFeignClient{

    @Override
    public ResponseEntity<Product> findProductById(Integer id) {
        Product product = new Product();
        product.setName("降级数据");
        return ResponseEntity.ok(product);
    }

    @Override
    public ResponseEntity<List<Product>> findAllProducts() {
        return null;
    }

    @Override
    public ResponseEntity<PageVO> findProductsPage(Integer current, Integer pageSize) {
        return null;
    }

    @Override
    public ResponseEntity<String> addProduct(Product product) {
        return null;
    }

    @Override
    public ResponseEntity<String> updateProduct(Product product) {
        return null;
    }

    @Override
    public ResponseEntity<String> deleteProduct(Integer id) {
        return null;
    }
}
